using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Design;
using System.Drawing.Drawing2D;
using System.Security.Permissions;
using System.Web;
using System.Web.UI;
using PickGold.Charting.Utilities;
using PickGold.Charting.Design;

namespace PickGold.Charting
{
	[DefaultProperty("IntervalOffset"), SRDescription("DescriptionAttributeStripLine_StripLine"), AspNetHostingPermission(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal), AspNetHostingPermission(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
	public class StripLine : ChartElement, IChartMapArea
	{
		private string _attributes = "";
		private Color _backColor = Color.Empty;
		private GradientStyle _backGradientStyle;
		private ChartHatchStyle _backHatchStyle;
		private string _backImage = "";
		private ChartImageAlignmentStyle _backImageAlignment;
		private Color _backImageTransparentColor = Color.Empty;
		private ChartImageWrapMode _backImageWrapMode;
		private Color _backSecondaryColor = Color.Empty;
		private Color _borderColor = Color.Empty;
		private ChartDashStyle _borderDashStyle = ChartDashStyle.Solid;
		private int _borderWidth = 1;
		private System.Drawing.Font _font;
		private FontCache _fontCache = new FontCache();
		private Color _foreColor = Color.Black;
		private double _interval;
		private double _intervalOffset;
		private DateTimeIntervalType _intervalType;
		private string _postbackValue = string.Empty;
		private double _stripWidth;
		private DateTimeIntervalType _stripWidthType;
		private string _text = "";
		private StringAlignment _textAlignment = StringAlignment.Far;
		private StringAlignment _textLineAlignment;
		private TextOrientation _textOrientation;
		private string _toolTip = "";
		private string _url = "";
		internal bool interlaced;
		internal DateTimeIntervalType intervalOffsetType;

		public StripLine()
		{
			this._font = this._fontCache.DefaultFont;
		}

		protected override void Dispose(bool disposing)
		{
			if (disposing && (this._fontCache != null))
			{
				this._fontCache.Dispose();
				this._fontCache = null;
			}
			base.Dispose(disposing);
		}

		private void Draw3DStrip(ChartGraphics graph, RectangleF rect, bool horizontal)
		{
			ChartArea chartArea = this.Axis.ChartArea;
			GraphicsPath path = null;
			DrawingOperationTypes drawElement = DrawingOperationTypes.DrawElement;
			if (this.Axis.Common.ProcessModeRegions)
			{
				drawElement |= DrawingOperationTypes.CalcElementPath;
			}
			path = graph.Fill3DRectangle(rect, chartArea.IsMainSceneWallOnFront() ? chartArea.areaSceneDepth : 0f, 0f, chartArea.matrix3D, chartArea.Area3DStyle.LightStyle, this.BackColor, this.BorderColor, this.BorderWidth, this.BorderDashStyle, drawElement);
			if (this.Axis.Common.ProcessModeRegions)
			{
				this.Axis.Common.HotRegionsList.AddHotRegion(graph, path, false, this.ToolTip, this.Url, this.MapAreaAttributes, this.PostBackValue, this, ChartElementType.StripLines);
			}
			if (horizontal)
			{
				if (!chartArea.IsSideSceneWallOnLeft())
				{
					rect.X = rect.Right;
				}
				rect.Width = 0f;
				path = graph.Fill3DRectangle(rect, 0f, chartArea.areaSceneDepth, chartArea.matrix3D, chartArea.Area3DStyle.LightStyle, this.BackColor, this.BorderColor, this.BorderWidth, this.BorderDashStyle, drawElement);
			}
			else if (chartArea.IsBottomSceneWallVisible())
			{
				rect.Y = rect.Bottom;
				rect.Height = 0f;
				path = graph.Fill3DRectangle(rect, 0f, chartArea.areaSceneDepth, chartArea.matrix3D, chartArea.Area3DStyle.LightStyle, this.BackColor, this.BorderColor, this.BorderWidth, this.BorderDashStyle, drawElement);
			}
			if (this.Axis.Common.ProcessModeRegions)
			{
				this.Axis.Common.HotRegionsList.AddHotRegion(graph, path, false, this.ToolTip, this.Url, this.MapAreaAttributes, this.PostBackValue, this, ChartElementType.StripLines);
			}
			if (path != null)
			{
				path.Dispose();
			}
		}

		private TextOrientation GetTextOrientation()
		{
			if ((this.TextOrientation != TextOrientation.Auto) || (this.Axis == null))
			{
				return this.TextOrientation;
			}
			if ((this.Axis.AxisPosition != AxisPosition.Bottom) && (this.Axis.AxisPosition != AxisPosition.Top))
			{
				return TextOrientation.Horizontal;
			}
			return TextOrientation.Rotated270;
		}

		private void Invalidate()
		{
		}

		internal void Paint(ChartGraphics graph, CommonElements common, bool drawLinesOnly)
		{
			if (!this.Axis.ChartArea.chartAreaIsCurcular)
			{
				RectangleF rect = this.Axis.ChartArea.PlotAreaPosition.ToRectangleF();
				bool horizontal = true;
				if ((this.Axis.AxisPosition == AxisPosition.Bottom) || (this.Axis.AxisPosition == AxisPosition.Top))
				{
					horizontal = false;
				}
				Series series = null;
				if ((this.Axis.axisType == AxisName.X) || (this.Axis.axisType == AxisName.X2))
				{
					List<string> xAxesSeries = this.Axis.ChartArea.GetXAxesSeries((this.Axis.axisType == AxisName.X) ? AxisType.Primary : AxisType.Secondary, this.Axis.SubAxisName);
					if (xAxesSeries.Count > 0)
					{
						series = this.Axis.Common.DataManager.Series[xAxesSeries[0]];
						if ((series != null) && !series.IsXValueIndexed)
						{
							series = null;
						}
					}
				}
				double viewMinimum = this.Axis.ViewMinimum;
				if ((!this.Axis.ChartArea.chartAreaIsCurcular || (this.Axis.axisType == AxisName.Y)) || (this.Axis.axisType == AxisName.Y2))
				{
					double interval = this.Interval;
					if (this.interlaced)
					{
						interval /= 2.0;
					}
					viewMinimum = ChartHelper.AlignIntervalStart(viewMinimum, interval, this.IntervalType, series);
				}
				if ((this.Interval == 0.0) || (((this.Axis.ViewMaximum - this.Axis.ViewMinimum) / ChartHelper.GetIntervalSize(viewMinimum, this._interval, this._intervalType, series, 0.0, DateTimeIntervalType.Number, false)) <= 10000.0))
				{
					DateTimeIntervalType type = (this.IntervalOffsetType == DateTimeIntervalType.Auto) ? this.IntervalType : this.IntervalOffsetType;
					if (this.Interval == 0.0)
					{
						viewMinimum = this.IntervalOffset;
					}
					else if (this.IntervalOffset > 0.0)
					{
						viewMinimum += ChartHelper.GetIntervalSize(viewMinimum, this.IntervalOffset, type, series, 0.0, DateTimeIntervalType.Number, false);
					}
					else if (this.IntervalOffset < 0.0)
					{
						viewMinimum -= ChartHelper.GetIntervalSize(viewMinimum, -this.IntervalOffset, type, series, 0.0, DateTimeIntervalType.Number, false);
					}
					int num3 = 0;
					do
					{
						if (num3++ > 0x2710)
						{
							return;
						}
						if ((this.StripWidth > 0.0) && !drawLinesOnly)
						{
							double axisValue = viewMinimum + ChartHelper.GetIntervalSize(viewMinimum, this.StripWidth, this.StripWidthType, series, this.IntervalOffset, type, false);
							if ((axisValue > this.Axis.ViewMinimum) && (viewMinimum < this.Axis.ViewMaximum))
							{
								RectangleF empty = RectangleF.Empty;
								double linearPosition = (float)this.Axis.GetLinearPosition(viewMinimum);
								double num6 = (float)this.Axis.GetLinearPosition(axisValue);
								if (horizontal)
								{
									empty.X = rect.X;
									empty.Width = rect.Width;
									empty.Y = (float)Math.Min(linearPosition, num6);
									empty.Height = ((float)Math.Max(linearPosition, num6)) - empty.Y;
									empty.Intersect(rect);
								}
								else
								{
									empty.Y = rect.Y;
									empty.Height = rect.Height;
									empty.X = (float)Math.Min(linearPosition, num6);
									empty.Width = ((float)Math.Max(linearPosition, num6)) - empty.X;
									empty.Intersect(rect);
								}
								if ((empty.Width > 0f) && (empty.Height > 0f))
								{
									graph.StartHotRegion(this._url, this._toolTip);
									if (!this.Axis.ChartArea.Area3DStyle.Enable3D)
									{
										graph.FillRectangleRel(empty, this.BackColor, this.BackHatchStyle, this.BackImage, this.BackImageWrapMode, this.BackImageTransparentColor, this.BackImageAlignment, this.BackGradientStyle, this.BackSecondaryColor, this.BorderColor, this.BorderWidth, this.BorderDashStyle, Color.Empty, 0, PenAlignment.Inset);
									}
									else
									{
										this.Draw3DStrip(graph, empty, horizontal);
									}
									graph.EndHotRegion();
									this.PaintTitle(graph, empty);
									if (common.ProcessModeRegions && !this.Axis.ChartArea.Area3DStyle.Enable3D)
									{
										common.HotRegionsList.AddHotRegion(empty, this.ToolTip, this.Url, this.MapAreaAttributes, this.PostBackValue, this, ChartElementType.StripLines, string.Empty);
									}
								}
							}
						}
						else if (((this.StripWidth == 0.0) && drawLinesOnly) && ((viewMinimum > this.Axis.ViewMinimum) && (viewMinimum < this.Axis.ViewMaximum)))
						{
							PointF firstPointF = PointF.Empty;
							PointF secondPointF = PointF.Empty;
							if (horizontal)
							{
								firstPointF.X = rect.X;
								firstPointF.Y = (float)this.Axis.GetLinearPosition(viewMinimum);
								secondPointF.X = rect.Right;
								secondPointF.Y = firstPointF.Y;
							}
							else
							{
								firstPointF.X = (float)this.Axis.GetLinearPosition(viewMinimum);
								firstPointF.Y = rect.Y;
								secondPointF.X = firstPointF.X;
								secondPointF.Y = rect.Bottom;
							}
							graph.StartHotRegion(this._url, this._toolTip);
							if (!this.Axis.ChartArea.Area3DStyle.Enable3D)
							{
								graph.DrawLineRel(this.BorderColor, this.BorderWidth, this.BorderDashStyle, firstPointF, secondPointF);
							}
							else
							{
								graph.Draw3DGridLine(this.Axis.ChartArea, this._borderColor, this._borderWidth, this._borderDashStyle, firstPointF, secondPointF, horizontal, this.Axis.Common, this);
							}
							graph.EndHotRegion();
							this.PaintTitle(graph, firstPointF, secondPointF);
							if (common.ProcessModeRegions)
							{
								SizeF size = new SizeF((float)(this.BorderWidth + 1), (float)(this.BorderWidth + 1));
								size = graph.GetRelativeSize(size);
								RectangleF rectArea = RectangleF.Empty;
								if (horizontal)
								{
									rectArea.X = firstPointF.X;
									rectArea.Y = firstPointF.Y - (size.Height / 2f);
									rectArea.Width = secondPointF.X - firstPointF.X;
									rectArea.Height = size.Height;
								}
								else
								{
									rectArea.X = firstPointF.X - (size.Width / 2f);
									rectArea.Y = firstPointF.Y;
									rectArea.Width = size.Width;
									rectArea.Height = secondPointF.Y - firstPointF.Y;
								}
								common.HotRegionsList.AddHotRegion(rectArea, this.ToolTip, this.Url, this.MapAreaAttributes, this.PostBackValue, this, ChartElementType.StripLines, string.Empty);
							}
						}
						if (this.Interval > 0.0)
						{
							viewMinimum += ChartHelper.GetIntervalSize(viewMinimum, this.Interval, this.IntervalType, series, this.IntervalOffset, type, false);
						}
					}
					while ((this.Interval > 0.0) && (viewMinimum <= this.Axis.ViewMaximum));
				}
			}
		}

		private void PaintTitle(ChartGraphics graph, RectangleF rect)
		{
			if (this.Text.Length > 0)
			{
				string text = this.Text;
				using (StringFormat format = new StringFormat())
				{
					format.Alignment = this.TextAlignment;
					format.LineAlignment = this.TextLineAlignment;
					int angle = 0;
					switch (this.TextOrientation)
					{
						case TextOrientation.Auto:
							if ((this.Axis.AxisPosition == AxisPosition.Bottom) || (this.Axis.AxisPosition == AxisPosition.Top))
							{
								angle = 270;
							}
							break;

						case TextOrientation.Rotated90:
							angle = 90;
							break;

						case TextOrientation.Rotated270:
							angle = 270;
							break;
					}
					switch (angle)
					{
						case 90:
							format.FormatFlags = StringFormatFlags.DirectionVertical;
							angle = 0;
							break;

						case 270:
							format.FormatFlags = StringFormatFlags.DirectionVertical;
							angle = 180;
							break;
					}
					SizeF ef = graph.MeasureStringRel(text.Replace(@"\n", "\n"), this.Font, new SizeF(100f, 100f), format, this.GetTextOrientation());
					float z = 0f;
					if (this.Axis.ChartArea.Area3DStyle.Enable3D)
					{
						Point3D[] points = new Point3D[3];
						z = this.Axis.ChartArea.IsMainSceneWallOnFront() ? this.Axis.ChartArea.areaSceneDepth : 0f;
						points[0] = new Point3D(0f, 0f, z);
						points[1] = new Point3D(ef.Width, 0f, z);
						points[2] = new Point3D(0f, ef.Height, z);
						this.Axis.ChartArea.matrix3D.TransformPoints(points);
						int index = this.Axis.ChartArea.IsMainSceneWallOnFront() ? 0 : 1;
						ef.Width *= ef.Width / (points[index].X - points[(index == 0) ? 1 : 0].X);
						ef.Height *= ef.Height / (points[2].Y - points[0].Y);
					}
					SizeF relativeSize = graph.GetRelativeSize(new SizeF((float)this.BorderWidth, (float)this.BorderWidth));
					PointF empty = PointF.Empty;
					if (format.Alignment == StringAlignment.Near)
					{
						empty.X = (rect.X + (ef.Width / 2f)) + relativeSize.Width;
					}
					else if (format.Alignment == StringAlignment.Far)
					{
						empty.X = (rect.Right - (ef.Width / 2f)) - relativeSize.Width;
					}
					else
					{
						empty.X = (rect.Left + rect.Right) / 2f;
					}
					if (format.LineAlignment == StringAlignment.Near)
					{
						empty.Y = (rect.Top + (ef.Height / 2f)) + relativeSize.Height;
					}
					else if (format.LineAlignment == StringAlignment.Far)
					{
						empty.Y = (rect.Bottom - (ef.Height / 2f)) - relativeSize.Height;
					}
					else
					{
						empty.Y = (rect.Bottom + rect.Top) / 2f;
					}
					format.Alignment = StringAlignment.Center;
					format.LineAlignment = StringAlignment.Center;
					if (this.Axis.ChartArea.Area3DStyle.Enable3D)
					{
						Point3D[] pointdArray2 = new Point3D[2];
						pointdArray2[0] = new Point3D(empty.X, empty.Y, z);
						if (format.FormatFlags == StringFormatFlags.DirectionVertical)
						{
							pointdArray2[1] = new Point3D(empty.X, empty.Y - 20f, z);
						}
						else
						{
							pointdArray2[1] = new Point3D(empty.X - 20f, empty.Y, z);
						}
						this.Axis.ChartArea.matrix3D.TransformPoints(pointdArray2);
						empty = pointdArray2[0].PointF;
						switch (angle)
						{
							case 0:
							case 180:
							case 90:
							case 270:
								{
									if (format.FormatFlags == StringFormatFlags.DirectionVertical)
									{
										angle += 90;
									}
									pointdArray2[0].PointF = graph.GetAbsolutePoint(pointdArray2[0].PointF);
									pointdArray2[1].PointF = graph.GetAbsolutePoint(pointdArray2[1].PointF);
									float num4 = (float)Math.Atan((double)((pointdArray2[1].Y - pointdArray2[0].Y) / (pointdArray2[1].X - pointdArray2[0].X)));
									num4 = (float)Math.Round((double)((num4 * 180f) / 3.141593f));
									angle += (int)num4;
									break;
								}
						}
					}
					using (Brush brush = new SolidBrush(this.ForeColor))
					{
						graph.DrawStringRel(text.Replace(@"\n", "\n"), this.Font, brush, empty, format, angle, this.GetTextOrientation());
					}
				}
			}
		}

		private void PaintTitle(ChartGraphics graph, PointF point1, PointF point2)
		{
			if (this.Text.Length > 0)
			{
				RectangleF empty = RectangleF.Empty;
				empty.X = point1.X;
				empty.Y = point1.Y;
				empty.Height = point2.Y - empty.Y;
				empty.Width = point2.X - empty.X;
				this.PaintTitle(graph, empty);
			}
		}

		internal Axis Axis
		{
			get
			{
				if (this.Parent != null)
				{
					return (this.Parent.Parent as Axis);
				}
				return null;
			}
		}

		[Editor(typeof(ChartColorEditor), typeof(UITypeEditor)), PersistenceMode(PersistenceMode.Attribute), Bindable(true), SRCategory("CategoryAttributeAppearance"), DefaultValue(typeof(Color), ""), SRDescription("DescriptionAttributeBackColor"), TypeConverter(typeof(ColorConverter))]
		public Color BackColor
		{
			get
			{
				return this._backColor;
			}
			set
			{
				this._backColor = value;
				this.Invalidate();
			}
		}

		[Bindable(true), SRCategory("CategoryAttributeAppearance"), Editor(typeof(GradientEditor), typeof(UITypeEditor)), DefaultValue(0), SRDescription("DescriptionAttributeBackGradientStyle"), PersistenceMode(PersistenceMode.Attribute)]
		public GradientStyle BackGradientStyle
		{
			get
			{
				return this._backGradientStyle;
			}
			set
			{
				this._backGradientStyle = value;
				this.Invalidate();
			}
		}

		[Editor(typeof(HatchStyleEditor), typeof(UITypeEditor)), SRDescription("DescriptionAttributeBackHatchStyle"), DefaultValue(0), PersistenceMode(PersistenceMode.Attribute), SRCategory("CategoryAttributeAppearance"), Bindable(true)]
		public ChartHatchStyle BackHatchStyle
		{
			get
			{
				return this._backHatchStyle;
			}
			set
			{
				this._backHatchStyle = value;
				this.Invalidate();
			}
		}

		[PersistenceMode(PersistenceMode.Attribute), Bindable(true), SRDescription("DescriptionAttributeBackImage"), Editor(typeof(ImageValueEditor), typeof(UITypeEditor)), SRCategory("CategoryAttributeAppearance"), NotifyParentProperty(true), DefaultValue("")]
		public string BackImage
		{
			get
			{
				return this._backImage;
			}
			set
			{
				this._backImage = value;
				this.Invalidate();
			}
		}

		[SRCategory("CategoryAttributeAppearance"), PersistenceMode(PersistenceMode.Attribute), Bindable(true), DefaultValue(0), NotifyParentProperty(true), SRDescription("DescriptionAttributeBackImageAlign")]
		public ChartImageAlignmentStyle BackImageAlignment
		{
			get
			{
				return this._backImageAlignment;
			}
			set
			{
				this._backImageAlignment = value;
				this.Invalidate();
			}
		}

		[DefaultValue(typeof(Color), ""), SRDescription("DescriptionAttributeImageTransparentColor"), Editor(typeof(ChartColorEditor), typeof(UITypeEditor)), Bindable(true), SRCategory("CategoryAttributeAppearance"), NotifyParentProperty(true), TypeConverter(typeof(ColorConverter)), PersistenceMode(PersistenceMode.Attribute)]
		public Color BackImageTransparentColor
		{
			get
			{
				return this._backImageTransparentColor;
			}
			set
			{
				this._backImageTransparentColor = value;
				this.Invalidate();
			}
		}

		[SRCategory("CategoryAttributeAppearance"), DefaultValue(0), NotifyParentProperty(true), SRDescription("DescriptionAttributeImageWrapMode"), PersistenceMode(PersistenceMode.Attribute), Bindable(true)]
		public ChartImageWrapMode BackImageWrapMode
		{
			get
			{
				return this._backImageWrapMode;
			}
			set
			{
				this._backImageWrapMode = value;
				this.Invalidate();
			}
		}

		[DefaultValue(typeof(Color), ""), SRCategory("CategoryAttributeAppearance"), SRDescription("DescriptionAttributeBackSecondaryColor"), PersistenceMode(PersistenceMode.Attribute), Bindable(true), TypeConverter(typeof(ColorConverter)), Editor(typeof(ChartColorEditor), typeof(UITypeEditor))]
		public Color BackSecondaryColor
		{
			get
			{
				return this._backSecondaryColor;
			}
			set
			{
				this._backSecondaryColor = value;
				this.Invalidate();
			}
		}

		[Bindable(true), PersistenceMode(PersistenceMode.Attribute), TypeConverter(typeof(ColorConverter)), DefaultValue(typeof(Color), ""), SRDescription("DescriptionAttributeBorderColor"), Editor(typeof(ChartColorEditor), typeof(UITypeEditor)), SRCategory("CategoryAttributeAppearance")]
		public Color BorderColor
		{
			get
			{
				return this._borderColor;
			}
			set
			{
				this._borderColor = value;
				this.Invalidate();
			}
		}

		[SRCategory("CategoryAttributeAppearance"), DefaultValue(5), Bindable(true), SRDescription("DescriptionAttributeBorderDashStyle"), PersistenceMode(PersistenceMode.Attribute)]
		public ChartDashStyle BorderDashStyle
		{
			get
			{
				return this._borderDashStyle;
			}
			set
			{
				this._borderDashStyle = value;
				this.Invalidate();
			}
		}

		[PersistenceMode(PersistenceMode.Attribute), Bindable(true), SRDescription("DescriptionAttributeBorderWidth"), SRCategory("CategoryAttributeAppearance"), DefaultValue(1)]
		public int BorderWidth
		{
			get
			{
				return this._borderWidth;
			}
			set
			{
				this._borderWidth = value;
				this.Invalidate();
			}
		}

		[PersistenceMode(PersistenceMode.Attribute), SRCategory("CategoryAttributeTitle"), Bindable(true), DefaultValue(typeof(System.Drawing.Font), "Microsoft Sans Serif, 8pt"), SRDescription("DescriptionAttributeTitleFont"), NotifyParentProperty(true)]
		public System.Drawing.Font Font
		{
			get
			{
				return this._font;
			}
			set
			{
				this._font = value;
				this.Invalidate();
			}
		}

		[Editor(typeof(ChartColorEditor), typeof(UITypeEditor)), Bindable(true), DefaultValue(typeof(Color), "Black"), SRDescription("DescriptionAttributeStripLine_TitleColor"), NotifyParentProperty(true), TypeConverter(typeof(ColorConverter)), SRCategory("CategoryAttributeTitle"), PersistenceMode(PersistenceMode.Attribute)]
		public Color ForeColor
		{
			get
			{
				return this._foreColor;
			}
			set
			{
				this._foreColor = value;
				this.Invalidate();
			}
		}

		[DefaultValue((double)0.0), Bindable(true), RefreshProperties(RefreshProperties.All), SRDescription("DescriptionAttributeStripLine_Interval"), PersistenceMode(PersistenceMode.Attribute), SRCategory("CategoryAttributeData")]
		public double Interval
		{
			get
			{
				return this._interval;
			}
			set
			{
				this._interval = value;
				this.Invalidate();
			}
		}

		[TypeConverter(typeof(AxisLabelDateValueConverter)), PersistenceMode(PersistenceMode.Attribute), SRCategory("CategoryAttributeData"), Bindable(true), DefaultValue((double)0.0), SRDescription("DescriptionAttributeStripLine_IntervalOffset")]
		public double IntervalOffset
		{
			get
			{
				return this._intervalOffset;
			}
			set
			{
				this._intervalOffset = value;
				this.Invalidate();
			}
		}

		[RefreshProperties(RefreshProperties.All), PersistenceMode(PersistenceMode.Attribute), Bindable(true), DefaultValue(0), SRDescription("DescriptionAttributeStripLine_IntervalOffsetType"), SRCategory("CategoryAttributeData")]
		public DateTimeIntervalType IntervalOffsetType
		{
			get
			{
				return this.intervalOffsetType;
			}
			set
			{
				this.intervalOffsetType = (value != DateTimeIntervalType.NotSet) ? value : DateTimeIntervalType.Auto;
				this.Invalidate();
			}
		}

		[RefreshProperties(RefreshProperties.All), Bindable(true), DefaultValue(0), SRDescription("DescriptionAttributeStripLine_IntervalType"), PersistenceMode(PersistenceMode.Attribute), SRCategory("CategoryAttributeData")]
		public DateTimeIntervalType IntervalType
		{
			get
			{
				return this._intervalType;
			}
			set
			{
				this._intervalType = (value != DateTimeIntervalType.NotSet) ? value : DateTimeIntervalType.Auto;
				this.Invalidate();
			}
		}

		private bool IsTextVertical
		{
			get
			{
				TextOrientation textOrientation = this.GetTextOrientation();
				if (textOrientation != TextOrientation.Rotated90)
				{
					return (textOrientation == TextOrientation.Rotated270);
				}
				return true;
			}
		}

		[DefaultValue(""), SRCategory("CategoryAttributeMapArea"), PersistenceMode(PersistenceMode.Attribute), SRDescription("DescriptionAttributeMapAreaAttributes"), Bindable(true)]
		public string MapAreaAttributes
		{
			get
			{
				return this._attributes;
			}
			set
			{
				this._attributes = value;
				this.Invalidate();
			}
		}

		[SRCategory("CategoryAttributeAppearance"), SerializationVisibility(SerializationVisibility.Hidden), Browsable(false), DefaultValue("StripLine"), SRDescription("DescriptionAttributeStripLine_Name"), Bindable(false), PersistenceMode(PersistenceMode.Attribute), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
		public string Name
		{
			get
			{
				return "StripLine";
			}
		}

		[SRDescription("DescriptionAttributePostBackValue"), DefaultValue(""), SRCategory("CategoryAttributeMapArea")]
		public string PostBackValue
		{
			get
			{
				return this._postbackValue;
			}
			set
			{
				this._postbackValue = value;
			}
		}

		[DefaultValue((double)0.0), SRCategory("CategoryAttributeData"), SRDescription("DescriptionAttributeStripLine_StripWidth"), PersistenceMode(PersistenceMode.Attribute), Bindable(true)]
		public double StripWidth
		{
			get
			{
				return this._stripWidth;
			}
			set
			{
				if (value < 0.0)
				{
					throw new ArgumentException(SR.ExceptionStripLineWidthIsNegative, "value");
				}
				this._stripWidth = value;
				this.Invalidate();
			}
		}

		[SRCategory("CategoryAttributeData"), PersistenceMode(PersistenceMode.Attribute), Bindable(true), DefaultValue(0), SRDescription("DescriptionAttributeStripLine_StripWidthType"), RefreshProperties(RefreshProperties.All)]
		public DateTimeIntervalType StripWidthType
		{
			get
			{
				return this._stripWidthType;
			}
			set
			{
				this._stripWidthType = (value != DateTimeIntervalType.NotSet) ? value : DateTimeIntervalType.Auto;
				this.Invalidate();
			}
		}

		[PersistenceMode(PersistenceMode.Attribute), NotifyParentProperty(true), SRCategory("CategoryAttributeTitle"), Bindable(true), DefaultValue(""), SRDescription("DescriptionAttributeStripLine_Title")]
		public string Text
		{
			get
			{
				return this._text;
			}
			set
			{
				this._text = value;
				this.Invalidate();
			}
		}

		[SRCategory("CategoryAttributeTitle"), Bindable(true), DefaultValue(typeof(StringAlignment), "Far"), SRDescription("DescriptionAttributeStripLine_TitleAlignment"), NotifyParentProperty(true), PersistenceMode(PersistenceMode.Attribute)]
		public StringAlignment TextAlignment
		{
			get
			{
				return this._textAlignment;
			}
			set
			{
				this._textAlignment = value;
				this.Invalidate();
			}
		}

		[NotifyParentProperty(true), DefaultValue(typeof(StringAlignment), "Near"), SRDescription("DescriptionAttributeStripLine_TitleLineAlignment"), PersistenceMode(PersistenceMode.Attribute), Bindable(true), SRCategory("CategoryAttributeTitle")]
		public StringAlignment TextLineAlignment
		{
			get
			{
				return this._textLineAlignment;
			}
			set
			{
				this._textLineAlignment = value;
				this.Invalidate();
			}
		}

		[Bindable(true), NotifyParentProperty(true), PersistenceMode(PersistenceMode.Attribute), SRCategory("CategoryAttributeAppearance"), DefaultValue(0), SRDescription("DescriptionAttribute_TextOrientation")]
		public TextOrientation TextOrientation
		{
			get
			{
				return this._textOrientation;
			}
			set
			{
				this._textOrientation = value;
				this.Invalidate();
			}
		}

		[PersistenceMode(PersistenceMode.Attribute), Bindable(true), SRDescription("DescriptionAttributeToolTip"), DefaultValue(""), SRCategory("CategoryAttributeMapArea")]
		public string ToolTip
		{
			get
			{
				return this._toolTip;
			}
			set
			{
				this.Invalidate();
				this._toolTip = value;
			}
		}

		[Bindable(true), SRCategory("CategoryAttributeMapArea"), SRDescription("DescriptionAttributeUrl"), DefaultValue(""), PersistenceMode(PersistenceMode.Attribute), Editor(typeof(UrlValueEditor), typeof(UITypeEditor))]
		public string Url
		{
			get
			{
				return this._url;
			}
			set
			{
				this._url = value;
				this.Invalidate();
			}
		}
	}
}

